package com.ruoyi.controller.jpjs.rlexportdata;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.service.jpjs.PublicService;
import com.ruoyi.service.jpjs.recruitment.RecruitmentService;
import com.ruoyi.service.jpjs.rlexportdata.RlExportDataService;
import com.ruoyi.service.jpjs.rlexportdata.RlExportProDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author zeo
 * 人力资源数据导出
 */

@Controller
@RequestMapping("/rlExportData")
public class RlExportDataController extends BaseController {

    @Autowired
    PublicService publicService;

    @Autowired
    RlExportDataService rlExportDataService;

    @Autowired
    RlExportProDataService rlExportProDataService;

    private String prefix = "jpjs/rlexportdata";

    @GetMapping()
    public String rlExportData(ModelMap mmap) {
        return prefix + "/rlExportData";
    }

    /**
     * 导出
     */
    @RequestMapping("/exportData")
    @ResponseBody
    public AjaxResult exportSalaryData(String years,String months) throws Exception {
        return rlExportDataService.exportData(years,months);
    }

    /**
     * 项目导出
     */
    @RequestMapping("/exportProData")
    @ResponseBody
    public AjaxResult exportProData(String years,String months) throws Exception {
        return rlExportProDataService.exportProData(years,months);
    }
}


